<!DOCTYPE html>
<html>
  <head>
    <title>用户管理-编辑用户</title>
    <#include "fsoft-common.ftl" />
  </head>
  <body>
    <form class="layui-form layui-form-pane" action="" method="post" id="sysUserForm" lay-filter="sysUserForm" autocomplete="off">
			<#-- 隐藏域： ID，有ID，是编辑; 无ID，是新增 -->
			<input type="hidden" id="id" name="id" value="${user.id}">
			<#-- 隐藏域: 锁定标识 -->
			<input class="layui-input layui-hide" type="hidden" id="imgPath" name="imgPath" value="${user.imgPath}">
			<input class="layui-input layui-hide" type="hidden" id="orgId" value="${user.orgId}">
			<input class="layui-input layui-hide" type="hidden" id="deptId" value="${user.deptId}">
			<input class="layui-input layui-hide" type="hidden" id="currUserRoleId" value="<#list user.roleIdList as role>${role},</#list>">
			<div class="layui-fluid">
        <div class="layui-card">
          <div class="layui-card-body">
            <div class="layui-row layui-col-space5">
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label for="loginAcct" class="layui-form-label">
                    <span class="x-red">*</span>登 录 名
                  </label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="text" id="loginAcct" name="loginAcct" value="${user.loginAcct}" lay-verify="required" lay-reqText="登录名不能为空" autocomplete="off" <#if user.id??>disabled</#if>>
                  </div>
                </div>
              </div>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label for="loginAcct" class="layui-form-label">
                    <span class="x-red">*</span>姓  名
                  </label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="text" id="name" name="name" value="${user.name}" lay-verify="required" lay-reqText="姓名不能为空">
                  </div>
                </div>
              </div>
              <#if !(user.id)?? >
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label for="loginAcct" class="layui-form-label">密  码</label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="password" name="loginPwd" placeholder="为空，默认密码：123456">
                  </div>
                </div>
              </div>
              </#if>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">
                    <span class="x-red">*</span>角色
                  </label>
                  <div class="layui-input-block">
                    <div id="roleIdList" class="xm-select-demo"></div>
                  </div>
                </div>
              </div>
            </div>
            <div class="layui-row layui-col-space5">
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">
                    <span class="x-red">*</span>所属单位
                  </label>
                  <div class="layui-input-block">
                    <div id="xm-select-orgTrees" class="xm-select-demo"></div>
                  </div>
                </div>
              </div>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">
                    <span class="x-red">*</span>所属部门
                  </label>
                  <div class="layui-input-block">
                    <div id="selectDept" class="xm-select-demo"></div>
                  </div>
                </div>
              </div>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">手机</label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="text" id="mobile" name="mobile" value="${user.mobile}" autocomplete="off">
                  </div>
                </div>
              </div>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">电子邮箱</label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="text" id="email" name="email" value="${user.email}" autocomplete="off">
                  </div>
                </div>
              </div>
              <div class="layui-col-sm6">
                <div class="layui-form-item">
                  <label class="layui-form-label">皮肤</label>
                  <div class="layui-input-block">
                    <select name="theme" lay-filter="user-theme">
                      <option value="theme1" <#if user.theme=='theme1'>selected</#if> >简约黑</option>
                      <option value="theme2" <#if user.theme=='theme2'>selected</#if> >商务风</option>
                      <option value="theme3" <#if user.theme=='theme3'>selected</#if> >天籁红</option>
                    </select>
                  </div>
                </div>
              </div>
              <div class="layui-col-sm12">
                <div class="layui-form-item">
                  <label class="layui-form-label">联系地址</label>
                  <div class="layui-input-block">
                    <input class="layui-input" type="text" name="location" value="${user.location}">
                  </div>
                </div>
              </div>
            </div>
            <div class="layui-row layui-col-space5" style="margin-top:35px;">
              <div class="layui-col-sm2 layui-col-sm-offset10">
                <div class="layui-btn-container">
                  <button class="layui-btn layui-btn-sm layui-btn-normal" lay-filter="save" lay-submit>
                    <i class="fa fa-save" aria-hidden="true" ></i> 保 存
                  </button>
                </div>
              </div>
            </div>
          </div>
        </div>
			</div>
    </form>
	</body>
  <#include "fsoft-common-foot.ftl" />
	<script type="text/javascript" src="${request.contextPath}/static/fsoft-web/user/sysuser-modify.js?v=201910"></script>
</html>
